package classclass;

import java.util.Vector;

import clone.Mimic;

public class ClassClassMain {
	
	public static Object makeNewInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		Class a = Class.forName(className);
		Object obj = a.newInstance();
		return obj;
	}
	
	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		
//		Class c = Mimic.class;
//		String className = c.getName();
////		System.out.println("name: " + className);
//		
//		c = Vector.class;
//		className = c.getCanonicalName();
//		System.out.println("name: " + className);
		
		Object obj = ClassClassMain.makeNewInstance("java.net.URLDecoder");
		System.out.println(obj);
		
		
	}
	
}
